<?php

// mbilling/BillingBundle/Entity/usersBills.php
namespace mbilling\BillingBundle\Entity;
use Doctrine\ORM\Mapping as ORM;

/*
 типы счетов:
 1 - простой заказ
 2 - продление VPS
 3 - ручное добавление денег
 4 - регистрация домена
 5 - продление домена
 6 - бонус
 7 - добавление ip адреса
 */
/**
 * @ORM\Entity
 */
class usersBills
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(type="datetime")
     */
    protected $created_at;
    
    /**
     * @ORM\Column(type="float")
     */
    protected $money;
    
    /**
     * @ORM\Column(type="boolean")
     */
    protected $is_real;
    
    /**
     * @ORM\Column(type="boolean")
     */
    protected $is_paid;
      
    /**
     * @ORM\Column(type="integer")
     */
    protected $source_id;
	
    /**
     * @ORM\Column(type="integer")
     */
    protected $user_id;
	
    /**
     * @ORM\Column(type="integer")
     */
    protected $currency_id;

    /**
     * @ORM\Column(type="integer", nullable="TRUE")
     */
    protected $order_id;

    /**
     * @ORM\Column(type="integer", nullable="TRUE")
     */
    protected $domain_id;

    /**
     * @ORM\Column(type="integer")
     */
    protected $type;

    /**
     * @ORM\Column(type="float", nullable="TRUE")
     */
    protected $period;

    public function __construct()
    {
        $this->setCreatedAt(new \DateTime());
    }

    public function setId($id)
    {
        $this->id = $id;
    }
    public function getId()
    {
        return $this->id;
    }

    public function setCreatedAt($created_at)
    {
        $this->created_at = $created_at;
    }
    public function getCreatedAt()
    {
        return $this->created_at;
    }

    public function setMoney($money)
    {
        $this->money = $money;
    }
    public function getMoney()
    {
        return $this->money;
    }

    public function setIsReal($is_real)
    {
        $this->is_real = $is_real;
    }
    public function getIsReal()
    {
        return $this->is_real;
    }

    public function setIsPaid($is_paid)
    {
        $this->is_paid = $is_paid;
    }
    public function getIsPaid()
    {
        return $this->is_paid;
    }

    public function setSourceId($source_id)
    {
        $this->source_id = $source_id;
    }
    public function getSourceId()
    {
        return $this->source_id;
    }

    public function setUserId($user_id)
    {
        $this->user_id = $user_id;
    }
    public function getUserId()
    {
        return $this->user_id;
    }

    public function setCurrencyId($currency_id)
    {
        $this->currency_id = $currency_id;
    }
    public function getCurrencyId()
    {
        return $this->currency_id;
    }

    public function setOrderId($order_id)
    {
        $this->order_id = $order_id;
    }
    public function getOrderId()
    {
        return $this->order_id;
    }

    public function setDomainId($domain_id)
    {
        $this->domain_id = $domain_id;
    }
    public function getDomainId()
    {
        return $this->domain_id;
    }
    
    public function setType($type)
    {
        $this->type = $type;
    }
    public function getType()
    {
        return $this->type;
    }

    public function setPeriod($period)
    {
        $this->period = $period;
    }
    public function getPeriod()
    {
        return $this->period;
    }
    
    public function initDefaultEntity()
    {
        $this->setMoney('666.6');
        $this->setIsReal('1');
        $this->setIsPaid('0');
        $this->setSourceId('0');
        $this->setUserId('1');
        $this->setCurrencyId('1');
        $this->setOrderId('1');
        $this->setType('1');
        $this->setPeriod('4');
        return $this;
    }
}
?>
